const { dateFormat } = require("../../../utils/utilsNew")

// component/common/com-system-item/com-system-item.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    model: {
      type: Object,
      default: {}
    }
  },

  options: {
    styleIsolation: "apply-shared",
    addGlobalClass: true,
  },

  /**
   * 组件的初始数据
   */
  data: {
    _model: {}
  },

  lifetimes: {
    attached: function () {
      let model = this.data.model
      let _model = {...model}
      _model._time = dateFormat(model.systemMessageTime * 1000)

      this.setData({
        _model
      })
    },

    detached: function () {
      // 在组件实例被从页面节点树移除时执行
    },
  },

  /**
   * 组件的方法列表
   */
  methods: {

  }
})
